<?php
use Arhframe\Util\File;
header('Content-Type: image/png');
$router = Router::getInstance();
$info = $router->getInfo();
if(empty($info['productid'])){
 	die();
}
$orm = MiniOrm::getInstance();
$product = $orm->findById('Productlist', $info['productid']);
$imgBase64 = $product->getImgbase64();
if(empty($imgBase64)){
	$file = new File(ROOT.'/assets/images/noimage.png');
	echo $file->getContent();
	die();
}
echo base64_decode($product->getImgbase64());
